Electric generators convert mechanical energy to electrical energy by forcing electric charges to move through an electrical circuit, which is typically a coiled wire. There are two main types of electric generators: direct-current generators, which produce electric current that flows in one direction, and alternating-current generators, which produce electric current that reverses direction. Both types of generators work based on the same principles.